for $b in document("bib.xml")//book,
    $a in document("reviews.xml")//entry
where $b/title = $a/title
return
    count($a/price)

